<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    // \Illuminate\Support\Facades\Redis::set('cb',3333);
    // dd(\Illuminate\Support\Facades\Redis::get('sb'));
    return \Illuminate\Support\Str::uuid();
    return \Illuminate\Support\Facades\Redis::get('cb');
    // return view('welcome');
})->middleware(['throttle:100,1']);//1分支限制访问100次


Route::post('/login', 'FirstController@login');
Route::post('/register', 'FirstController@register');

Route::group([
    'prefix' => 'auth',
    'middleware' => 'jwt.auth'
], function ($router) {

    Route::post('/logout', 'FirstController@logout');
    Route::get('/refresh', 'FirstController@refresh');
    Route::get('/me', 'FirstController@me');
    Route::get('/ome', 'FirstController@getAuthUser');

});







// Route::fallback(function () {
//     return route('aa');
// });